<html>
<head>
    <title>add</title>
</head>
<body>
<div style="width: 800px">
    <form id="forms" class="form-horizontal" role="form">
        <div class="form-group">
            <label for="a" class="col-sm-2 control-label">影视名称:</label>
            <div class="col-sm-4">
                <input type="text" class="form-control" id="a" placeholder="请输入影视名称" name="movieName">
            </div>
        </div>
        <div class="form-group">
            <label for="g" class="col-sm-2 control-label">影视图片:</label>
            <div class="col-sm-4">
                <input type="text" class="form-control" id="g" placeholder="影视图片" name="movieImage">
                <input type="file" id="newsImg" name="myFile" multiple/>
            </div>
        </div>
        <div class="form-group">
            <label for="b" class="col-sm-2 control-label">简介:</label>
            <div class="col-sm-4">
                <input type="text" class="form-control" id="b" placeholder="请输入简介" name="introduction">
            </div>
        </div>
        <div class="form-group">
            <label for="c" class="col-sm-2 control-label">演员:</label>
            <div class="col-sm-4">
                <input type="text" class="form-control" id="c" placeholder="请输入演员"
                       name="actor">
            </div>
        </div>
        <div class="form-group">
            <label for="c" class="col-sm-2 control-label"></label>
            <div class="col-sm-4">
                <select class="form-control" name="type" id="type">
                    <option value="">类型:</option>
                    <th:block th:each="c : ${tType}">
                        <option th:value="${c.id}"><span th:text="${c.tName}"></span></option>
                    </th:block>
                </select>
                <select class="form-control" name="area" id="area">
                    <option value="">地区:</option>
                    <th:block th:each="c : ${tArea}">
                        <option th:value="${c.id}"><span th:text="${c.areaName}"></span></option>
                    </th:block>
                </select>
                <select class="form-control" name="years" id="years">
                    <option value="">年代:</option>
                    <th:block th:each="t : ${tYears}">
                        <option th:value="${t.id}"><span th:text="${t.yName}"></span></option>
                    </th:block>
                </select>
            </div>
        </div>

        <div class="form-group">
            <label for="d" class="col-sm-2 control-label">评分:</label>
            <div class="col-sm-4">
                <input type="text" class="form-control" id="d" placeholder="请输入评分" name="score">
            </div>
        </div>
        <div class="form-group">
            <label for="h" class="col-sm-2 control-label">上映时间:</label>
            <div class="col-sm-4">
                <input type="date" class="form-control" id="h" placeholder="请输入上映时间" name="updateTime">
            </div>
        </div>
        <div class="form-group">
            <label for="h" class="col-sm-2 control-label">播放来源:</label>
            <div class="col-sm-4">
                <input type="text" class="form-control" id="h" placeholder="请输入播放来源" name="playType">
            </div>
        </div>
        <div class="form-group">
            <label for="c" class="col-sm-2 control-label"></label>
            <div class="col-sm-4">
                <select class="form-control" name="channel" id="channel">
                    <option value="">类型:</option>
                    <th:block th:each="c : ${tCharnnel}">
                        <option th:value="${c.id}"><span th:text="${c.cName}"></span></option>
                    </th:block>
                </select>
                <select class="form-control" name="tags" id="tags">
                    <option value="">标签:</option>
                    <th:block th:each="c : ${tTag}">
                        <option th:value="${c.id}"><span th:text="${c.tagName}"></span></option>
                    </th:block>
                </select>
            </div>
        </div>
    </form>
</div>
<script type="text/javascript">
    $('#newsImg').fileinput({
        language: 'zh',
        uploadUrl: '/file/upLoadFile',
        enctype: "multipart/form-data",
        browseClass: 'btn btn-primary'
    });
    $('#newsImg').on("fileuploaded", function (event, data, previewId, index) {
        $("#g").val(data.response.imgUrl);
    });
</script>
</body>
</html>

